<!DOCTYPE html>
<html lang="en">

<head>
    <title>测试</title>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- <script src="https://unpkg.com/vue@3"></script> -->
    <!-- <link rel="stylesheet" href="https://unpkg.com/element-plus/dist/index.css"> -->
    <!-- <script src="https://unpkg.com/element-plus@2.5.3/dist/index.full.js"></script> -->
    <!-- <script src="https://unpkg.com/element-plus"></script> -->
    <script src="/static/js/vue3.js"></script>
    <link rel="stylesheet" href="/static/css/element-plus.css">
    <script src="/static/js/element-plus.js"></script>
    <script src="/static/js/axios.js"></script>
    <script src="/static/js/server.js"></script>
</head>

<body>
    <div id="app">
        Vue3使用案例
        <div>{{message}}</div>
        <el-button type="success" @click="showTip">Primary</el-button>
        <el-button @click="nextTap">Primary</el-button>
    </div>
</body>
<script>
    const { createApp } = Vue
    createApp({
        data() {
            return {
                message: 'Hello Vue!'
            }
        },
        methods: {
            showTip() {
                ElementPlus.ElMessage({ message: "哈哈" })
            },
            nextTap() {
                axios.post('http://127.0.0.1:8001?name=test&mehtod=hello', this.userInfo).then(res => {
                    console.log(res);
                    if (res.code == 200) {
                        window.location.href = '/app/view/index.html';
                    } else {
                        this.errorInfo = res.msg;
                    }
                })
            }
        },
    }).use(ElementPlus)
        .mount('#app')
</script>

</html>